<?php

namespace App\Events;

use Illuminate\Broadcasting\Channel;
use Illuminate\Queue\SerializesModels;
use Illuminate\Broadcasting\PrivateChannel;
use Illuminate\Broadcasting\PresenceChannel;
use Illuminate\Foundation\Events\Dispatchable;
use Illuminate\Broadcasting\InteractsWithSockets;
use Illuminate\Contracts\Broadcasting\ShouldBroadcast;
use Illuminate\Support\Facades\Log;

class R360GetCertPicEvent
{
    use Dispatchable, InteractsWithSockets, SerializesModels;

    public $user_id;
    public $tokens;
    public $order_no;

    /**
     * R360GetCertPicEvent constructor.
     * @param $user_id "用户id"
     * @param $tokens "图片token"
     * @param $order_no "订单号"
     */
    public function __construct($user_id,$tokens,$order_no)
    {
        $this->user_id = $user_id;
        $this->tokens =  $tokens;
        $this->tokens =  $order_no;
    }

    /**
     * Get the channels the event should broadcast on.
     *
     * @return \Illuminate\Broadcasting\Channel|array
     */
    public function broadcastOn()
    {
        return new PrivateChannel('channel-name');
    }
}
